<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <style>
        .table3 tr {
            height: 40px;
            line-height: 40px;
            border: 1px #ccc solid
        }
    </style>
</head>
<body>
<div class="content content_frame">
    <h3 class="mainTitle"><img src="${basePath}/images/icon2.png"/>订单信息明细</h3>
    <br/>
    <ul class="contentNav dib-wrap">
        <li class="dib">
            <a onclick="javascript:history.go(-1)">
                <i class='fa fa-reply'></i>&nbsp;&nbsp;返&nbsp;回 </a>
        </li>
    </ul>
    <br/>
    <input type="hidden" name="indx" value="${orderHead.id}">
    <table class="table3">
        <tr>
            <th colspan="4">订单基本信息</th>
        </tr>
        <tr>
            <td width="15%">订单编号</td>
            <td width="35%">
                <label>${orderHead.orderno}</label>
            </td>
            <td width="15%">订单流水号</td>
            <td width="35%">
                <label>${orderHead.orderserialno}</label>
            </td>
        </tr>
        <tr>
            <td>订单批次号</td>
            <td>
                <label>${orderHead.batchno}</label>
            </td>
            <td>电商平台编号</td>
            <td>
                <label>${orderHead.ecpcode}</label>
            </td>
        </tr>
        <tr>
            <td>电商平台名称</td>
            <td>
                <label>${orderHead.ecpname}</label>
            </td>
            <td>电商企业编号</td>
            <td>
                <label>${orderHead.cbecode}</label>
            </td>
        </tr>
        <tr>
            <td>电商企业名称</td>
            <td>
                <label>${orderHead.cbename}</label>
            </td>
            <td>收货人名称</td>
            <td>
                <label>${orderHead.consigneename}</label>
            </td>
        </tr>
        <tr>
            <td>申报单位代码</td>
            <td>
                <label>${orderHead.entCode}</label>
            </td>
            <td>申报单位名称</td>
            <td>
                <label>${orderHead.entName}</label>
            </td>
        </tr>
        <tr>
            <td>收货人电话</td>
            <td>
                <label>${orderHead.consigneetel}</label>
            </td>
            <td>收货人地址</td>
            <td>
                <label>${ orderHead.consigneeaddress}</label>
            </td>
        </tr>
        <tr>
            <td>进/出口编号</td>
            <td>
                <label>
                    <c:if test="${orderHead.ietype=='I'}">进口</c:if>
                    <c:if test="${orderHead.ietype=='E'}">出口</c:if>
                </label>
            </td>
            <td>收货人所在国</td>
            <td>
                <label>${ orderHead.consigneecountrycodeDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>收货人证件类型</td>
            <td>
                <label>
                    ${'1' eq orderHead.idtype?'身份证':'其他'}</label>
            </td>
            <td>收货人证件号码</td>
            <td>
                <label>${orderHead.idcard}</label>
            </td>
        </tr>
        <tr>
            <td>订单商品货款</td>
            <td>
                <label>${orderHead.goodsvalue}</label>
            </td>

            <td>订单商品运费</td>
            <td>
                <label>${ orderHead.freight}</label>
            </td>
        </tr>
        <tr>
            <td>币制</td>
            <td>
                <label>${orderHead.currencyDisplay}</label>
            </td>

            <td>业务类型</td>
            <td>
                <label>${'1' eq orderHead.biztype?'保税备货':'2' eq orderHead.biztype?'保税集货':'3' eq orderHead.biztype?'邮件':'快件'}</label>
            </td>
        </tr>
        <tr>
            <td>贸易国别</td>
            <td>
                <label>${orderHead.tradecountrycodeDisplay}</label>
            </td>

            <td>优惠减免金额</td>
            <td>
                <label>${ orderHead.discount}</label>
            </td>
        </tr>
        <tr>
            <td>实际支付金额</td>
            <td>
                <label>${orderHead.acturalpaid}</label>
            </td>

            <td>订购人注册号</td>
            <td>
                <label>${ orderHead.idregno}</label>
            </td>
        </tr>
        <tr>
            <td>订购人姓名</td>
            <td>
                <label>${orderHead.idname}</label>
            </td>

            <td>支付企业代码</td>
            <td>
                <label>${ orderHead.paycode}</label>
            </td>
        </tr>
        <tr>
            <td>支付企业名称</td>
            <td>
                <label>${orderHead.payname}</label>
            </td>

            <td>支付交易编号</td>
            <td>
                <label>${ orderHead.paytransactionid}</label>
            </td>
        </tr>
        <tr>
            <td>监管机构代码</td>
            <td>
                <label>${orderHead.orgcode}</label>
            </td>

            <td>发件人城市</td>
            <td>
                <label>${ orderHead.sendercity}</label>
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td colspan="3">
                <label>${orderHead.remark}</label>
            </td>
        </tr>
    </table>
    <br/>

    <div class="title">订单商品信息列表</div>
    <table id="goodsList"></table>
    <div id="goodsListPage">
    </div>
    <br/>
</div>
</body>
<script type="text/javascript">
    $(function () {
        $(".table3 td:even").css("background-color", "#f5f5f5");

        $("#goodsList").jqGrid({
            datatype: "local",
            data: JSON.parse('${goodsListJSON}'),
            colNames: ['序号', '商品货号', '商品条码', '商品名称', '单价', '总价', '币制编号', '原产国/产地编号', '成交数量', '计量单位编号', '包装数量', '包装种类编号', '规格型号', '商品描述', '商品毛重', '产品国检备案编号', '网站链接', '入库时间', '备注'],
            colModel: [
                {name: 'seqno', index: 'seqno'},
                {name: 'goodsno', index: 'goodsno'},
                {name: 'goodsbarcode', index: 'goodsbarcode'},
                {name: 'goodsname', index: 'goodsname'},
                {name: 'price', index: 'price'},
                {name: 'pricetotal', index: 'pricetotal'},
                {name: 'currencyDisplay', index: 'currencyDisplay'},
                {name: 'countrycodeDisplay', index: 'countrycodeDisplay'},
                {name: 'countnum', index: 'countnum'},
                {name: 'unitcodeDisplay', index: 'unitcodeDisplay'},
                {name: 'packnumber', index: 'packnumber'},
                {name: 'wraptypecode', index: 'wraptypecode'},
                {name: 'goodsmodel', index: 'goodsmodel'},
                {name: 'itemdescribe', index: 'itemdescribe'},
                {name: 'goodsroughweight', index: 'goodsroughweight'},
                {name: 'productrecordno', index: 'productrecordno'},
                {name: 'websitehref', index: 'websitehref'},
                {name: 'createTime', index: 'createTime'},
                {name: 'remark', index: 'remark'}
            ],
            viewrecords: true, // show the current page, data rang and total records on the toolbar
            height: 'auto',
            autowidth: true,
            shrinkToFit: false,
            autoScroll: true,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            width: $('body').width(),
            pager: "#goodsListPage", //分页工具栏

            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                }
                else {//如果存在记录，则隐藏提示信息。
                    $(this).parent().children('.norecords').hide();
                }
                $("#goodsList").setGridWidth($(window).width() * 0.98);
                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
            }
        });

        $(window).resize(function () {
            $("#waybillList,#goodsList").setGridWidth($(window).width() * 0.98);
        });
    });
</script>
</html>
